<?php

session_start();

$action = $_GET['action'] ?? $_POST['action'] ?? '';

if ($action == 'sendMessage') {
    $nickname = $_POST['nickname'] ?? '';
    $message = $_POST['message'] ?? '';